﻿using System;

namespace Com.OpenCode.DwgConvert.Model
{
    /// <summary>
    /// 代理委托
    /// </summary>
    /// <param name="args"></param>
    public delegate void DataConvertDelegate(DataConvertEventArgs args);

    /// <summary>
    /// 数据转换参数基类
    /// </summary>
    public class DataConvertEventArgs : EventArgs
    {
        public DataConvertEventArgs(IDataConvert dataConvert)
        {
            DataConvert = dataConvert;
            Cancle = false;
        }

        /// <summary>
        /// 事件源数据
        /// </summary>
        public IDataConvert DataConvert { get; protected set; }

        /// <summary>
        /// 任务是否取消
        /// 事件返回参数用来控制任务是否继续执行
        /// </summary>
        public bool Cancle { get; set; }
    }
}